<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PersonalAlbumModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>
        <%=Model.Localize("Blog.edit") %></h2>
    <%= Html.ValidationSummary() %>
    <% using (Html.BeginForm())
       {%>
       <%--=Html.Anti ForgeryToken() --%>
    <fieldset>
      
        <span>
            <label for="Title">
                <%=Model.Localize("Blog.Title")%>:</label>
            <%= Html.TextBox("Title",Model.Post.Title) %>
            <%= Html.ValidationMessage("Title", "*") %>
        </span>
         <span>
            <label for="Author">
                <%=Model.Localize("Blog.Author")%>:</label>
            <%= Html.TextBox("Author", Model.Post.UserName)%>
            <%= Html.ValidationMessage("Author", "*")%>
        </span>
        <span>
            <label for="DateCreated">
                <%=Model.Localize("Blog.Date")%>:</label>
            <%= Html.TextBox("DateCreated", Model.Post.DateCreated.ToString("yyyy-MM-dd HH:mm"))%>
            <%= Html.ValidationMessage("DateCreated", "*") %>
        </span>
       
        <div>
           
            <%= Html.TextArea("Content", Model.Post.Content)%>
            <%= Html.ValidationMessage("Content", "*")%>
        </div>
        <p>
            <label for="Tags">
                <%=Model.Localize("Blog.Tags")%>:</label>
            <%= Html.TextBox("Tags",string.Join(",",Model.Post.Tags.Select(t=>t.Name).ToArray())) %>
            <%= Html.ValidationMessage("Tags", "*")%>
        </p>
         <span>
            <label for="Approved">
                <%=Model.Localize("Blog.Approved")%>:</label>
            <%= Html.CheckBox("Approved", Model.Post.Approved)%>
        </span>
        <p>
            <input type="submit" value="<%=Model.Localize("Blog.Submit") %>" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%=Html.ActionLink(Model.Localize("Blog.backToList"), "Index") %>
    </div>
     <script src="<%=Html.AbsolutePath("HtmlEditor/fckeditor.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
window.onload = function()
{
    var oFCKeditor = new FCKeditor('Content');
oFCKeditor.BasePath = '<%=Html.AbsolutePath("HtmlEditor") %>/' ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
</asp:Content>
